﻿using UnityEngine;
namespace BehaviorSystem {
    
    /// <summary>
    /// 行为代理接口
    /// </summary>
    public interface IBehaviorAgent
    {
        /// <summary>
        /// 代理ID
        /// </summary>
        int AgentID { get; }

        /// <summary>
        /// 根节点
        /// </summary>
        IBehaviourNode RootNode { get; set; }

        /// <summary>
        /// 初始化组件
        /// </summary>
        void InitComponent();

        /// <summary>
        /// 周期函数
        /// </summary>
        void Tick();

        /// <summary>
        /// 获取组件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        T GetComponent<T>() ;
    }
}